﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LibraryManagement.Custom_Controls
{
    public partial class libComboBox : ComboBox
    {
        public libComboBox()
        {
            InitializeComponent();
        }

        public void SetDataSource(IEnumerable<dynamic> DataSource, String displayMember, String ValueMember)
        {
            this.DataSource = DataSource;
            this.DisplayMember = displayMember;
            this.ValueMember = ValueMember;
            this.SelectedIndex = -1;
            this.Text = "< Select >";
        }
    }
}
